package com.yanqu.road.entity.activity.civil.enums;

import com.yanqu.road.entity.enums.eActivityType;
import com.yanqu.road.entity.enums.eGamePlayerEventType;

/**
 * 全民通用奖励conditionType（需要用到这种奖励领取，新加枚举）
 */
public enum ActivityCivilConditionTypeEnum {

    ZHENHUAN_THIRD_PROCESS_BANQUET_TIMES_CIVIL(eGamePlayerEventType.ZhenHuanThirdProcessBanquetTimesCivil.getValue(), eActivityType.ZhenHuan.getValue(), "甄嬛3-庆典游行举办次数全民奖励"),
    ;
    int type;

    int activityType;

    String desc;

    ActivityCivilConditionTypeEnum(int type, int activityType, String desc) {
        this.type = type;
        this.desc = desc;
        this.activityType = activityType;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getActivityType() {
        return activityType;
    }

    public void setActivityType(int activityType) {
        this.activityType = activityType;
    }

    /**
     * 判断condition type 是否符合
     * @param conditionType
     * @return
     */
    public static boolean checkConditionType(int conditionType) {
        for (ActivityCivilConditionTypeEnum typeEnum : ActivityCivilConditionTypeEnum.values()) {
            if (conditionType == typeEnum.getType()) {
                return true;
            }
        }
        return false;
    }


    /**
     * 检查活动类型是否有效
     * @param activityTypeType 活动类型
     * @return 如果活动类型有效则返回true，否则返回false
     */
    public static boolean checkActivityType(int activityTypeType) {
        for (ActivityCivilConditionTypeEnum typeEnum : ActivityCivilConditionTypeEnum.values()) {
            if (activityTypeType == typeEnum.getActivityType()) {
                return true;
            }
        }
        return false;
    }

}
